﻿<Window xmlns:my="clr-namespace:JControlEx"  x:Class="JControlEx.ViewObjectWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="ViewObjectWindow" SizeToContent="WidthAndHeight" MinWidth="600" ShowInTaskbar="False">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="348*"/>
            <RowDefinition Height="36"/>
        </Grid.RowDefinitions>
        <ComboBox HorizontalAlignment="Left" Margin="4" Name="comboBoxTypes" Width="106" ItemsSource="{Binding ItemTypes}"
                  DisplayMemberPath="Name" SelectedItem="{Binding SelectedItemType}"/>
        <ComboBox Margin="115,4,4,4" Name="comboBoxResourceList" ItemsSource="{Binding ResourceList}"
                  SelectedItem="{Binding SelectedObject}" TextBoxBase.TextChanged="comboBoxResourceList_TextChanged"/>
        <my:ObjectViewer Grid.Row="1" Margin="3" DataContext="{Binding SelectedObject}" x:Name="objectViewer"/>
        <Button Margin="8,5,0,8" HorizontalAlignment="Left" Content="Null" Width="50" Foreground="Blue" Grid.Row="2" Name="NullButton" Click="NullButton_Click"/>
        <Button Margin="70,5,0,8" HorizontalAlignment="Left" Content="New" Width="50" Foreground="Green" Grid.Row="2" Name="NewButton" Click="NewButton_Click"/>
        <Button Margin="0,5,38,8" HorizontalAlignment="Right" Content="Cancel" Grid.Row="2" Width="50" Click="Button_Click"/>
        <Button Margin="0,5,120,8" HorizontalAlignment="Right" Content="OK" Grid.Row="2" Width="50" Click="Button_Click" />
    </Grid>
</Window>
